The issue may be caused by the fact that the VC (B) inside it will not have set its size until after the VC (B) has set its layout after viewDidAppear was called. You may want to check what the height of the VC (B) is inside VC (A)'s viewDidAppear, and if that is still 0, you may need to setup a delegate from the VC (B) viewDidAppear to send the height after auto layout has finished up. If you are able to get the height that way, you could then manually setup the height of the stack view.
An easier solution would be to not use a VC inside a stack view, and instead use a UIView, if that is possible for your design at all.
Post
Replies
Boosts
Views
Activity
Thank you @OOPer, that did it!
I think this crash may be caused by a bug. If you have "abcdef" and then undo "abcdef" it tries to replace the range with empty strings. It should be doing this on range (5, 0), however, it is trying to do it from (10, 5), which doesn't exist, thus the out of index crash.
As a work around, you could change your code to look like:
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
guard let text = textField.text else { return true }
let str = text + string
if str.count <= 30 {
if (string.isEmpty && range.length > 0) {
textField.text = text.count > range.length ? String(text.dropLast(range.length)) : ""
return false
}
return true
}
return false
}
This will still allow the undo function to work, while preventing any crashes. Hope this helps!
I am just learning about doing the bridging header in the Ray Wenderlich book I have on Metal. Seems like doing that will help prevent future problems, as well.
@Frameworks Engineer Is there any way to detect when the user has direct touch turned on via the rotor or not?
There seem to be a lot of VoiceOver changes since iOS 13, and even more in iOS 14. I am not certain why Apple is making some of the decisions they are making, as they seem to make VoiceOver support harder and harder to manage properly.
In your case, I would recommend posting a UIAccessibility notification like the one below, where backButton is replaced with a reference to the back button (or whatever element you want VoiceOver to focus on):
UIAccessibility.post(notification: .layoutChanged, argument: backButton)
I was able to figure this out on my own. Adding the following code to my class that extends UILabel did the trick:
override var accessibilityContainerType: UIAccessibilityContainerType {
get { return .semanticGroup }
set { }
}
override var accessibilityLabel: String? {
get { return "" }
set { }
}
override var accessibilityHint: String? {
get { return "" }
set { }
}
@ARtsunami_z Installing the older version of the FBX Python SDK did the trick for me too, thanks!